function che=chsta(x,tol); 
% function che=chsta(x,tol); 
% Check if the vector (row or column) x is
% implies a stationary polynomial 
% Where polynomial will be read as 
% x(L)p =1 - x(1) - x(2)L -....- x(p)(L^p)
% i.e. x=(0.5 0.3) corresponds to 
% phi(L)2 = 1 - 0.5L - 0.3(L^2) 
% tol is an optional tolerance setting 
% if omitted tol = 1e-4; 
if ( nargin < 2 )  | ( isempty(tol) == 1 ) 
    tol=1e-4; 
end
[x,c]=c2r(x);
che=0;
if min( abs( rootpol([1 x]) ) ) >= (1 + tol);
    che=1; 
end